package com.it.server.mapper;

import com.it.pojo.Entity.OrdersDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDishMapper {
    /**
     * 批量插入订单菜品
     * @param ordersDishList
     */
    void insertBatch(List<OrdersDish> ordersDishList);

    /**
     * 根据订单id查询订单菜品
     * @param id
     * @return
     */
    @Select("select * from orders_dish where order_id = #{id}")
    List<OrdersDish> getByOrderId(Integer id);
}
